home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / fchart / makefile < prev    next >
Encoding:
Makefile  |  1994-06-05  |  3.5 KB  |  137 lines

  1. ######################################################################
  2. #
  3. # WARNING:
  4. #
  5. # * if fchart sources are not in the gnuplot directory, define
  6. #   following variable as a path to it:
  7.  
  8. GNUP=../gnuplot
  9.  
  10. #   (default is as you see)
  11. #   Name this file 'Makefile' and just use 'make ...'
  12. #
  13. # * if fchart is in the gnuplot directory, define
  14. #
  15. # GNUP=.
  16. #
  17. #   and use 'make -f <this_file> ...'
  18. #   since this file requires presence of the original Makefile
  19. #
  20. ######################################################################
  21.  
  22. # where to install executable and help on 'make install'
  23. DEST=/usr/local/bin/fchart
  24. HELPDEST=/usr/local/lib/fchart.gih
  25.  
  26. ######################################################################
  27.  
  28. # substitute your troff command (and any flags) for this one
  29. TROFF=itroff
  30.  
  31. # -DFORK if you have vfork()
  32. # -DBCOPY if your memcpy() is called bcopy() (a Berkeleyism, right?)
  33. # -DNOCOPY if you don't have a memcpy() by any name
  34. # -DGAMMA if you've got gamma(3)
  35. # -O if you trust your compiler's optimizer
  36. # -g if you don't trust me
  37. CFLAGS = -I$(GNUP) -DVFORK -DBCOPY -DGAMMA -O #-g
  38.  
  39. OBJS =     fcmd.o fgraf.o fmisc.o fchart.o futil.o font.o flblarr.o
  40. OBJG =  $(GNUP)/term.o $(GNUP)/help.o $(GNUP)/scanner.o
  41.  
  42. CSRC =  fcmd.c fgraf.c fmisc.c fchart.c futil.c font.c flblarr.c
  43. OSRC =  fstyles.i fchart.h README.ins Makefile fversion.c
  44. DSRC =  fchart.doc titlepage.ms titlepage.tex
  45.  
  46. # -lplot if you have -DUNIXPLOT in gnuplot Makefile
  47. LIBS = -lm -lplot
  48.  
  49. fchart: $(OBJG) $(OBJS) fversion.o
  50.     cc $(CFLAGS) $(OBJG) $(OBJS) fversion.o $(LIBS) -o fchart
  51.  
  52. all: install
  53.  
  54. #copying requires setting TO variable and copies from cwd
  55. copy:
  56.     cp $(CSRC) $(TO)
  57.     cp $(OSRC) $(TO)
  58.     cp $(DSRC) $(TO)
  59.  
  60. doc: gih hlp tex nroff
  61.  
  62. install: fchart install-unix
  63.     cp fchart $(DEST)
  64.     strip $(DEST)
  65.  
  66. $(OBJS) $(OBJG): $(GNUP)/plot.h 
  67.  
  68. $(OBJS): fchart.h
  69.  
  70. fcmd.o fmisc.o $(GNUP)/help.o: $(GNUP)/help.h
  71.  
  72. fgraf.o: fstyles.i
  73.  
  74. fcmd.o:
  75.     cc $(CFLAGS) -c fcmd.c -DHELPFILE=\"$(HELPDEST)\"
  76.  
  77. $(GNUP)/help.o:
  78.     ( cd $(GNUP) ; make help.o )
  79.  
  80. $(GNUP)/scanner.o:
  81.     ( cd $(GNUP) ; make scanner.o )
  82.  
  83. $(GNUP)/term.o:
  84.     ( cd $(GNUP) ; make term.o ) 
  85.  
  86. clean:
  87.     rm -f *.o fchart fchart.gih fchart.toc fchart.tex fchart.nroff
  88.     rm -f fchart.aux fchart.log fchart.dvi fchart.hlp fchart.ms *~
  89.  
  90. ### [tn]roff documentation
  91. troff: fchart.ms titlepage.ms
  92.     tbl fchart.ms | eqn | $(TROFF) -ms
  93.  
  94. # for screen viewing, or printers with backspace/overstrike, remove the -Tlpr
  95. nroff fchart.nroff: fchart.ms titlepage.ms
  96.     tbl fchart.ms | neqn | nroff -ms -Tlpr > fchart.nroff
  97.  
  98. ms fchart.ms: $(GNUP)/docs/doc2ms fchart.doc
  99.     $(GNUP)/docs/doc2ms < fchart.doc > fchart.ms
  100.  
  101. $(GNUP)/docs/doc2ms:
  102.     ( cd $(GNUP)/docs ; make doc2ms )
  103.  
  104. ### LaTeX documentation
  105. tex fchart.tex: $(GNUP)/docs/doc2tex fchart.doc
  106.     $(GNUP)/docs/doc2tex < fchart.doc > fchart.tex
  107.  
  108. dvi fchart.dvi: fchart.tex titlepage.tex
  109.     ( latex fchart.tex ; latex fchart.tex )
  110.  
  111. $(GNUP)/docs/doc2tex:
  112.     ( cd $(GNUP)/docs ; make doc2tex )
  113.  
  114. ### this is how to make fchart.hlp
  115. hlp fchart.hlp: $(GNUP)/docs/doc2hlp fchart.doc
  116.     $(GNUP)/docs/doc2hlp < fchart.doc > fchart.hlp
  117.  
  118. $(GNUP)/docs/doc2hlp:
  119.     ( cd $(GNUP)/docs ; make doc2hlp )
  120.  
  121. ### this is how to make fchart.gih
  122. gih fchart.gih: $(GNUP)/docs/doc2gih fchart.doc
  123.     $(GNUP)/docs/doc2gih < fchart.doc > fchart.gih
  124.  
  125. $(GNUP)/docs/doc2gih:
  126.     ( cd $(GNUP)/docs ; make doc2gih )
  127.  
  128. ### For Unix and MSDOS only
  129. install-unix: fchart.gih
  130.     cp fchart.gih $(HELPDEST)
  131.  
  132. ### for VMS only
  133. install-vms: fchart.hlp
  134.     cp fchart.hlp $(HELPDEST)
  135.  
  136.  
  137.